import { createStore, Module } from "vuex";

interface StateProps {
  about: string;
}

export const About: Module<any, any> = {
  namespaced: true,
  state: {
    about: "123",
    books: [
      {
        book: "深入vue3",
        count: 1,
        value: 10,
      },
    ],
  },
  mutations: {
    setAbout(state, value: any) {
      state.about = value;
    },
  },
  actions: {
    setAbout(context: any, value: any) {
      context.commit("setAbout", value);
    },
  },
  getters: {
    aboutGetters(state, getters){
      return 'aboutGetters'
    }
  },
  modules: {},
};
